#include <stdio.h>
#define N 10
int main()
{
    int a[N];
    for(int i = 0; i < N; i++)
    {
        scanf("%d", &a[i]);
    }

    //查找
    printf("请输入要查找的值：\n");
    int x;
    scanf("%d", &x);
    //折半查找
	int l = 0;
	int r = N-1;
	int m;
	while(l<=r)
	{
		m = (l+r)/2;
        if(a[m] == x)
            break;
        else if(a[m] > x)
        {
        	r = m-1;
        }
        else
        {
        	l = m+1;
        }
        //if(l > r)
        //	break;
	}
	if(l > r)
	{
		printf("-1\n");
	}
	else
	{
		printf("%d\n",m);
	}
}